# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-purl
pkgver=1.6
pkgrel=4
pkgdesc="An immutable URL class for easy URL-building and manipulation"
arch=('any')
license=('MIT')
url="https://github.com/codeinthehole/purl"
depends=('python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://github.com/codeinthehole/purl/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('293079e9e15ac7e1669ea534ea8ac3aea92ebc1a18b33fc15e135e241da9c5612978946deca8fe3e53b39004ee33393317901ed3dfe053be12399591050dd9cd')

build() {
  cd purl-$pkgver
  python setup.py build
}

check() {
  cd purl-$pkgver
  python -m pytest
}

package() {
  cd purl-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
